# -*- coding: utf-8 -*-

###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc
import wx.grid

###########################################################################
## Class MainFrame
###########################################################################

class MainFrame ( wx.Frame ):

	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"超声参数选择器", pos = wx.DefaultPosition, size = wx.Size( 757,696 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )

		main_sizer = wx.BoxSizer( wx.VERTICAL )

		tg_sizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"碳钢管道" ), wx.VERTICAL )

		tg_input = wx.BoxSizer( wx.HORIZONTAL )

		self.tg_staticText0 = wx.StaticText( tg_sizer.GetStaticBox(), wx.ID_ANY, u"管道外径", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.tg_staticText0.Wrap( -1 )

		tg_input.Add( self.tg_staticText0, 0, wx.ALL, 5 )

		self.tg_gw = wx.TextCtrl( tg_sizer.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		tg_input.Add( self.tg_gw, 0, wx.ALL, 5 )

		self.tg_staticText1 = wx.StaticText( tg_sizer.GetStaticBox(), wx.ID_ANY, u"管道壁厚", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.tg_staticText1.Wrap( -1 )

		tg_input.Add( self.tg_staticText1, 0, wx.ALL, 5 )

		self.tg_gh = wx.TextCtrl( tg_sizer.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		tg_input.Add( self.tg_gh, 0, wx.ALL, 5 )

		self.tg_staticText2 = wx.StaticText( tg_sizer.GetStaticBox(), wx.ID_ANY, u"导出到文件", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.tg_staticText2.Wrap( -1 )

		tg_input.Add( self.tg_staticText2, 0, wx.ALL, 5 )

		self.tg_folder = wx.DirPickerCtrl( tg_sizer.GetStaticBox(), wx.ID_ANY, wx.EmptyString, u"请选择文件夹", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
		tg_input.Add( self.tg_folder, 0, wx.ALL, 5 )

		self.tg_btn = wx.Button( tg_sizer.GetStaticBox(), wx.ID_ANY, u"导出", wx.DefaultPosition, wx.DefaultSize, 0 )
		tg_input.Add( self.tg_btn, 0, wx.ALL, 5 )


		tg_sizer.Add( tg_input, 1, wx.ALL|wx.EXPAND, 5 )

		self.tg_rlt = wx.StaticText( tg_sizer.GetStaticBox(), wx.ID_ANY, u"计算结果", wx.DefaultPosition, wx.Size( -1,30 ), 0 )
		self.tg_rlt.Wrap( -1 )
		self.tg_rlt.SetForegroundColour( (255,0,0) )

		tg_sizer.Add( self.tg_rlt, 0, wx.ALL, 5 )

		self.tg_grid = wx.grid.Grid( tg_sizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )

		# Grid
		self.tg_grid.CreateGrid( 1, 3 )
		self.tg_grid.EnableEditing( True )
		self.tg_grid.EnableGridLines( True )
		self.tg_grid.EnableDragGridSize( True )
		self.tg_grid.SetMargins( 0, 0 )

		# Columns
		self.tg_grid.SetColSize( 0, 200 )
		self.tg_grid.SetColSize( 1, 200 )
		self.tg_grid.SetColSize( 2, 200 )
		self.tg_grid.EnableDragColMove( False )
		self.tg_grid.EnableDragColSize( True )
		self.tg_grid.SetColLabelSize( 50 )
		self.tg_grid.SetColLabelValue( 0, u"试块" )
		self.tg_grid.SetColLabelValue( 1, u"检测灵敏度" )
		self.tg_grid.SetColLabelValue( 2, u"推荐探头" )
		self.tg_grid.SetColLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Rows
		self.tg_grid.SetRowSize( 0, 50 )
		self.tg_grid.EnableDragRowSize( True )
		self.tg_grid.SetRowLabelSize( 80 )
		self.tg_grid.SetRowLabelValue( 0, u"推荐值" )
		self.tg_grid.SetRowLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Label Appearance
		self.tg_grid.SetLabelFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )

		# Cell Defaults
		self.tg_grid.SetDefaultCellFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )
		self.tg_grid.SetDefaultCellAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )
		tg_sizer.Add( self.tg_grid, 0, wx.ALL, 5 )


		main_sizer.Add( tg_sizer, 1, wx.EXPAND, 5 )

		sbSizer123 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"不锈钢管道" ), wx.VERTICAL )

		bSizer113 = wx.BoxSizer( wx.HORIZONTAL )

		self.m_staticText193 = wx.StaticText( sbSizer123.GetStaticBox(), wx.ID_ANY, u"管道外径", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText193.Wrap( -1 )

		bSizer113.Add( self.m_staticText193, 0, wx.ALL, 5 )

		self.m_textCtrl173 = wx.TextCtrl( sbSizer123.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer113.Add( self.m_textCtrl173, 0, wx.ALL, 5 )

		self.m_staticText203 = wx.StaticText( sbSizer123.GetStaticBox(), wx.ID_ANY, u"管道壁厚", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText203.Wrap( -1 )

		bSizer113.Add( self.m_staticText203, 0, wx.ALL, 5 )

		self.m_textCtrl183 = wx.TextCtrl( sbSizer123.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer113.Add( self.m_textCtrl183, 0, wx.ALL, 5 )


		sbSizer123.Add( bSizer113, 1, wx.ALL|wx.EXPAND, 5 )

		self.m_csq_11 = wx.StaticText( sbSizer123.GetStaticBox(), wx.ID_ANY, u"计算结果", wx.DefaultPosition, wx.Size( -1,30 ), 0 )
		self.m_csq_11.Wrap( -1 )

		sbSizer123.Add( self.m_csq_11, 0, wx.ALL, 5 )

		self.m_grid73 = wx.grid.Grid( sbSizer123.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )

		# Grid
		self.m_grid73.CreateGrid( 1, 3 )
		self.m_grid73.EnableEditing( True )
		self.m_grid73.EnableGridLines( True )
		self.m_grid73.EnableDragGridSize( True )
		self.m_grid73.SetMargins( 0, 0 )

		# Columns
		self.m_grid73.SetColSize( 0, 200 )
		self.m_grid73.SetColSize( 1, 200 )
		self.m_grid73.SetColSize( 2, 200 )
		self.m_grid73.EnableDragColMove( False )
		self.m_grid73.EnableDragColSize( True )
		self.m_grid73.SetColLabelSize( 50 )
		self.m_grid73.SetColLabelValue( 0, u"试块" )
		self.m_grid73.SetColLabelValue( 1, u"检测灵敏度" )
		self.m_grid73.SetColLabelValue( 2, u"推荐探头" )
		self.m_grid73.SetColLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Rows
		self.m_grid73.SetRowSize( 0, 50 )
		self.m_grid73.EnableDragRowSize( True )
		self.m_grid73.SetRowLabelSize( 80 )
		self.m_grid73.SetRowLabelValue( 0, u"推荐值" )
		self.m_grid73.SetRowLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Label Appearance
		self.m_grid73.SetLabelFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )

		# Cell Defaults
		self.m_grid73.SetDefaultCellFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )
		self.m_grid73.SetDefaultCellAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )
		sbSizer123.Add( self.m_grid73, 0, wx.ALL, 5 )


		main_sizer.Add( sbSizer123, 1, wx.EXPAND, 5 )

		sbSizer121 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"碳钢容器" ), wx.VERTICAL )

		bSizer111 = wx.BoxSizer( wx.HORIZONTAL )

		self.m_staticText191 = wx.StaticText( sbSizer121.GetStaticBox(), wx.ID_ANY, u"容器外径", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText191.Wrap( -1 )

		bSizer111.Add( self.m_staticText191, 0, wx.ALL, 5 )

		self.m_textCtrl171 = wx.TextCtrl( sbSizer121.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer111.Add( self.m_textCtrl171, 0, wx.ALL, 5 )

		self.m_staticText201 = wx.StaticText( sbSizer121.GetStaticBox(), wx.ID_ANY, u"焊缝类别", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText201.Wrap( -1 )

		bSizer111.Add( self.m_staticText201, 0, wx.ALL, 5 )

		self.m_textCtrl181 = wx.TextCtrl( sbSizer121.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer111.Add( self.m_textCtrl181, 0, wx.ALL, 5 )

		self.m_staticText47 = wx.StaticText( sbSizer121.GetStaticBox(), wx.ID_ANY, u"厚度范围", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText47.Wrap( -1 )

		bSizer111.Add( self.m_staticText47, 0, wx.ALL, 5 )

		self.m_textCtrl37 = wx.TextCtrl( sbSizer121.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer111.Add( self.m_textCtrl37, 0, wx.ALL, 5 )


		sbSizer121.Add( bSizer111, 1, wx.ALL|wx.EXPAND, 5 )

		self.m_staticText221 = wx.StaticText( sbSizer121.GetStaticBox(), wx.ID_ANY, u"计算结果：", wx.DefaultPosition, wx.Size( -1,30 ), 0 )
		self.m_staticText221.Wrap( -1 )

		sbSizer121.Add( self.m_staticText221, 0, wx.ALL, 5 )

		self.m_grid71 = wx.grid.Grid( sbSizer121.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.Size( -1,-1 ), 0 )

		# Grid
		self.m_grid71.CreateGrid( 1, 3 )
		self.m_grid71.EnableEditing( True )
		self.m_grid71.EnableGridLines( True )
		self.m_grid71.EnableDragGridSize( True )
		self.m_grid71.SetMargins( 0, 0 )

		# Columns
		self.m_grid71.SetColSize( 0, 200 )
		self.m_grid71.SetColSize( 1, 200 )
		self.m_grid71.SetColSize( 2, 200 )
		self.m_grid71.EnableDragColMove( False )
		self.m_grid71.EnableDragColSize( True )
		self.m_grid71.SetColLabelSize( 50 )
		self.m_grid71.SetColLabelValue( 0, u"检测灵敏度" )
		self.m_grid71.SetColLabelValue( 1, u"试块" )
		self.m_grid71.SetColLabelValue( 2, u"推荐探头规格" )
		self.m_grid71.SetColLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Rows
		self.m_grid71.SetRowSize( 0, 50 )
		self.m_grid71.EnableDragRowSize( True )
		self.m_grid71.SetRowLabelSize( 80 )
		self.m_grid71.SetRowLabelValue( 0, u"推荐值" )
		self.m_grid71.SetRowLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Label Appearance
		self.m_grid71.SetLabelFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )

		# Cell Defaults
		self.m_grid71.SetDefaultCellFont( wx.Font( 11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "宋体" ) )
		self.m_grid71.SetDefaultCellAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )
		sbSizer121.Add( self.m_grid71, 0, wx.ALL, 5 )


		main_sizer.Add( sbSizer121, 1, wx.EXPAND, 5 )


		self.SetSizer( main_sizer )
		self.Layout()

		self.Centre( wx.BOTH )

		# Connect Events
		self.tg_gw.Bind( wx.EVT_TEXT, self.tg_cln )
		self.tg_gh.Bind( wx.EVT_TEXT, self.tg_calc )
		self.tg_btn.Bind( wx.EVT_BUTTON, self.tg_output )
		self.m_textCtrl173.Bind( wx.EVT_TEXT, self.m_cln_2 )
		self.m_textCtrl183.Bind( wx.EVT_TEXT, self.m_calc_2 )
		self.m_textCtrl171.Bind( wx.EVT_TEXT, self.m_cln_3 )
		self.m_textCtrl37.Bind( wx.EVT_TEXT, self.m_calc_3 )

	def __del__( self ):
		pass


	# Virtual event handlers, overide them in your derived class
	def tg_cln( self, event ):
		event.Skip()

	def tg_calc( self, event ):
		event.Skip()

	def tg_output( self, event ):
		event.Skip()

	def m_cln_2( self, event ):
		event.Skip()

	def m_calc_2( self, event ):
		event.Skip()

	def m_cln_3( self, event ):
		event.Skip()

	def m_calc_3( self, event ):
		event.Skip()


